feat(react-kit): email otp authentication flow#100
Conversation
| const handleVerify = async () => { | ||
| if (!otp.trim() || !otpId) return | ||
|
|
||
| setError(false) | ||
| try { | ||
| await verifyOtp({ otpId, code }) | ||
| await verifyOtp({ otpId, code: otp.trim() }) | ||
| goToStep('authenticated') | ||
| config?.onSuccess?.() | ||
| } catch (err) { |
There was a problem hiding this comment.
I am wondering if we need the Verifying screen for the manual otp flow, we can verify the otp on the same screen as shown in the demo video
There was a problem hiding this comment.
Yeah I think it's better if we remove the screen itself now and verify on the same screen.
There was a problem hiding this comment.
@brtkx I think we can keep it for magic link?
028cc7b to
dbae517
Compare
13e5d05 to
8a256ca
Compare
dbae517 to
6bce2fe
Compare
053ca18 to
40004db
Compare
6bce2fe to
1f59081
Compare
40004db to
cc5d328
Compare
1f59081 to
3d69c8c
Compare
cc5d328 to
949aaca
Compare
3d69c8c to
fc89cf5
Compare
949aaca to
a926391
Compare
6bd5e27 to
5538f07
Compare
# Conflicts: # packages/react-kit/src/shared/components/AppLogo/AppLogo.test.tsx
5538f07 to
66e517e
Compare
| const handleVerify = async () => { | ||
| if (!otp.trim() || !otpId) return | ||
|
|
||
| setError(false) | ||
| try { | ||
| await verifyOtp({ otpId, code }) | ||
| await verifyOtp({ otpId, code: otp.trim() }) | ||
| goToStep('authenticated') | ||
| config?.onSuccess?.() | ||
| } catch (err) { |
There was a problem hiding this comment.
Yeah I think it's better if we remove the screen itself now and verify on the same screen.
| }, | ||
| } | ||
|
|
||
| export const FourDigits: Story = { |
There was a problem hiding this comment.
Why are we removing the length prop?
There was a problem hiding this comment.
Updated!
(I was thinking devs would be using our ZD backend which is using 6 digit code, but yeah keeping it dynamic makes sense anyways 👍 )
Closes FS-1958, FS-1961, FS-1962, FS-1959
Summary
This PR implements UI for the rest of the email otp auth flow
Demo
demo.mp4